<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
/*  let i=1
  while (i<=10){
      if (i===6){
          // 如果i===6 使用break退出整个循环
          break
      }
      console.log(i)
      i++
  }*/

/*for (let i = 1; i <=3 ; i++) {
    if (i===3){
        continue
    }
    console.log(i)
}*/
while (true){
    const str=prompt("你爱我吗")
    if (str==="爱"){
        break
    }
}
</script>
</body>
</html>